<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath%>">

		<title>CON-012: Production Control System [Select Field]</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	</head>

	<body>
		<f:view>
			<f:loadBundle var="bundle"
				basename="com.tpc.control.message.ResourceBundle" />
				
			<h:form id="con012Form">
				<a4j:outputPanel ajaxRendered="true" id="selectFieldPanel">				
					<rich:panel>
						<h:commandButton value="Back to Select Data" action="con010" />
						<h:commandButton value="Select All"
							actionListener="#{con010.selectAll}" />
						<h:commandButton value="Deselect All"
							actionListener="#{con010.deselectAll}" />
						<a4j:commandButton id="saveButton" reRender="con012Form"
							value="Save as variant">
							<rich:componentControl for="saveVariantForm"
								attachTo="saveButton" operation="show" event="onclick" />
						</a4j:commandButton>
						<!--  
			<h:outputLink value="#" id="saveLink">
         		Save as variant
        		<rich:componentControl for="saveVariantForm" attachTo="saveLink" operation="show" event="onclick"/>
    		</h:outputLink>
    		-->
						<h:panelGrid columns="3" border="0" style="width: 700px">
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectCustomer}" />
								<h:outputText value="#{bundle.select01}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectCustomerName}" />
								<h:outputText value="#{bundle.select02}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectCustomerPoNo}" />
								<h:outputText value="#{bundle.select03}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectSaleOrder}" />
								<h:outputText value="#{bundle.select04}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectSaleLine}" />
								<h:outputText value="#{bundle.select05}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectChannel}" />
								<h:outputText value="#{bundle.select06}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectSaleCreated}" />
								<h:outputText value="#{bundle.select07}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPreDue}" />
								<h:outputText value="#{bundle.select08}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectDueDate}" />
								<h:outputText value="#{bundle.select09}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPirNo}" />
								<h:outputText value="#{bundle.select10}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPirDueDate}" />
								<h:outputText value="#{bundle.select11}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectMaterial}" />
								<h:outputText value="#{bundle.select12}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectDesignFg}" />
								<h:outputText value="#{bundle.select13}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectDyeLot}" />
								<h:outputText value="#{bundle.select14}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectQuantity}" />
								<h:outputText value="#{bundle.select15}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectUom}" />
								<h:outputText value="#{bundle.select16}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectSeq}" />
								<h:outputText value="#{bundle.select17}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectProdCreateDate}" />
								<h:outputText value="#{bundle.select18}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPlanStartDate}" />
								<h:outputText value="#{bundle.select19}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPlanFinishDate}" />
								<h:outputText value="#{bundle.select20}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectStartDate}" />
								<h:outputText value="#{bundle.select21}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectLastPostingDate}" />
								<h:outputText value="#{bundle.select22}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPoNo}" />
								<h:outputText value="#{bundle.select23}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectDesignGreige}" />
								<h:outputText value="#{bundle.select24}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectGreigeDue}" />
								<h:outputText value="#{bundle.select25}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPlanGreige}" />
								<h:outputText value="#{bundle.select26}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectActualGreige}" />
								<h:outputText value="#{bundle.select27}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectGreigeRemark}" />
								<h:outputText value="#{bundle.select28}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectStartDye}" />
								<h:outputText value="#{bundle.select29}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectDyeRemark}" />
								<h:outputText value="#{bundle.select30}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectDueSubmitDate}" />
								<h:outputText value="#{bundle.select31}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectSubmitDate}" />
								<h:outputText value="#{bundle.select32}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectStatus}" />
								<h:outputText value="#{bundle.select33}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectPlanDueDate}" />
								<h:outputText value="#{bundle.select34}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectCurrentOper}" />
								<h:outputText value="#{bundle.select35}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectUserStatus}" />
								<h:outputText value="#{bundle.select36}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectTotalProduct}" />
								<h:outputText value="#{bundle.select37}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectFinishGoods}" />
								<h:outputText value="#{bundle.select38}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectConfirmToPlan}" />
								<h:outputText value="#{bundle.select39}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectConfirmToSale}" />
								<h:outputText value="#{bundle.select40}" />
							</h:panelGroup>
							<h:panelGroup>
								<h:selectBooleanCheckbox value="#{con010.selectConfirmType}" />
								<h:outputText value="#{bundle.select41}" />
							</h:panelGroup>							
						</h:panelGrid>
						<h:selectOneMenu value="#{con010.selectVariantName}">
							<f:selectItems value="#{con010.variantList}" />
							<a4j:support event="onchange" reRender="selectFieldPanel"
								actionListener="#{con010.changeVariantEvent}"></a4j:support>
						</h:selectOneMenu>
					</rich:panel>
			</a4j:outputPanel>
			</h:form>
			<h:form id="con012_01Form">	
				<rich:modalPanel id="saveVariantForm">
					<f:facet name="header">
						<h:outputText value="Save Variant" />
					</f:facet>
					<f:facet name="controls">
						<h:panelGroup>
							<h:graphicImage value="/images/modal/close.png"
								styleClass="hidelink" id="hidelink" />
							<rich:componentControl for="saveVariantForm" attachTo="hidelink"
								operation="hide" event="onclick" />
						</h:panelGroup>
					</f:facet>
					<h:outputText value="Variant Name" />
					<h:inputText value="#{con010.variantName}" />
					<a4j:commandButton reRender="con012Form" value="Save"
						id="saveVariantButton" action="#{con010.saveVariant}"
						onclick="javascript:Richfaces.hideModalPanel('saveVariantForm');" />
				</rich:modalPanel>
			</h:form>
		</f:view>
	</body>
</html>